const {Schema,model}=require('mongoose');

let commentSchema=new Schema({
  userName:String,
  content:String,
  img:String,
  AritcleId:{
    type:Schema.Types.ObjectId,ref:'contentMod'
  },
  createTime: {
    type: Date,
    default: Date.now
  },
  State:{
    type:Boolean,
    default: false
  },
  parentCom:{
    type:Schema.Types.ObjectId,ref:'commentMod',
    default:"61beec3feec5ed681d3760e2",
  },
  
},{versionKey:false})

var commentMod=model('commentMod',commentSchema,'comment');

module.exports.commentMod=commentMod;